package leetcode.code1641;

import leetcode.IDebug;
import leetcode.helper.H;

public class Solution implements IDebug {

	public int countVowelStrings(int n) {
		int[][] dp = new int[n + 1][5];
		for (int i = 0; i < 5; i++) {
			dp[0][i] = 1;
		}
		for (int i = 0; i < 5; i++) {
			for (int j = 1; j < n; j++) {
				int cur = 0;
				for (int k = 0; k <= i; k++) {
					cur += dp[j - 1][k];
				}
				dp[j][i] = cur;
			}
		}
		int ans = 0;
		for (int i = 0; i < 5; i++) {
			ans += dp[n - 1][i];
		}
		return ans;
	}

	@Override
	public void debug4() {
		H.compare(15, this.countVowelStrings(2));
		H.compare(5, this.countVowelStrings(1));
		H.compare(66045, this.countVowelStrings(33));

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug1() {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		Solution so = new Solution();
		so.debug1();
		so.debug2();
		so.debug3();
		so.debug4();

	}

}
